﻿@model VNWIKI_WEB.Models.DataList
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section categoryList {
    @{foreach (var pt in Model.CatList)
      { 
        <li><a href="@Url.RouteUrl("CategoryView", new { catID = pt.ID })">@pt.Name</a>
        </li>
      } }
}
@section content {
    <div class="slider">
        <div class="border">
            <div class="info">
                <h2>
                    Upload Ảnh @Session["userName"]</h2>
                <table cellpadding="0" cellspacing="0" style="margin-top: 20px; line-height: 20px;
                    width: 100%; background: #ecf9ff; text-align: center">
                    <tr>
                        <td style="width: 33%; color: #ccc">
                            Bước 1 (Tạo Album Ảnh)
                        </td>
                        <td style="width: 33%; background: #00a0d2; color: #ffffff">
                            Bước 2 (Upload Ảnh)
                        </td>
                        <td style="width: 33%; color: #ccc">
                            Bước 3 (Xem lại Album ảnh vừa up)
                        </td>
                    </tr>
                </table>
            </div>
            <div class="views">
                <div style="width: 80%; margin-top: 10px">
                    <input id="file_upload" name="file_upload" type="file" multiple="true" />
                    <input class="blue" type="button" value="Begin Upload" id="uploadButton" onclick="BeginUpload();" />
                    <script type="text/javascript">
                      
                        $(function () {
                            $('#file_upload').uploadify({
                                'uploader': '../Library/uploadify2.4/uploadify.swf',
                                'script': '@Url.RouteUrl("ReceiveFileUpload")',
                                'cancelImg': '../Library/uploadify2.4/cancel.png',
                                'auto': false,
                                'multi': true,
                                'fileDataName': 'MyFile',
                                'onAllComplete': function (event, data) { MyUploadCompleted(event, data); },
                                'onComplete': function (event, ID, fileObj, response, data) { MyUploadComleted(event, ID, fileObj, response, data); },
                                'scriptData': { 'ASPSESSID': '@Session.SessionID', 'AUTHID': '' }
                            });
                        });
                        function BeginUpload() {
                            $('#file_upload').uploadifyUpload();
                        }
                        function MyUploadCompleted(event, data) {
                            alert('Upload all successful!');
                        }
                        function MyUploadComleted(event, ID, fileObj, response, data) {

                        }
                    </script>
                </div>
                <div style="width: 80%;">
                </div>
            </div>
        </div>
    </div>
    <div class="album-list">
    </div>
    <div id="fb-root">
    </div>
    <script>
        (function (d, s, id) {
            var js, fjs = d.getElementsByTagName(s)[0];
            if (d.getElementById(id)) return;
            js = d.createElement(s); js.id = id;
            js.src = "//connect.facebook.net/vi_VN/all.js#xfbml=1";
            fjs.parentNode.insertBefore(js, fjs);
        } (document, 'script', 'facebook-jssdk'));
    </script>
}
